package com.neu.flashmall.ms.service;

import com.github.pagehelper.PageInfo;
import com.neu.flashmall.ms.entity.SysUser;
import com.neu.flashmall.ms.vo.UserVo;

import com.neu.flashmall.ms.vo.AuthorityVo;
import com.neu.flashmall.ms.vo.SysUserVo;


public interface SysUserService {

    boolean checkUserName(String username);

    int register(SysUser user);

    boolean resetPassword(String username);

    boolean changePassword(SysUser sysUser);

    SysUserVo login(String username, String password);

    String login(String username,String password,SysUserVo returnSysUserVo);

    boolean checkPhone(UserVo userVo);

    PageInfo<SysUser> getPaged(int pageNum, int pageSize);

    int delete(long id);

    int update(SysUser sysUser);


    String toMakeUpAuthorityVo(String username,String password,AuthorityVo result);

    SysUserVo getUserWithAuthorityByToken(String token);

    String changeUserStatus(String username,Integer status);

    SysUser getSysUserByTokenWithRedis(String token);

    String generateTokenForUser(Long sysUserId);

    SysUser getSysUserByIdWithRedis(Long sysUserId);

    String logout(String token);
}
